<?php

//FlowName: 我的报修

function plugin_data_wygl_baoxiuxinxi_7_init_default()  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
}

function plugin_data_wygl_baoxiuxinxi_7_add_default_data_before_submit()  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
    //print_R($GLOBAL_USER);
    $_POST['报修人'] = $GLOBAL_USER->姓名;
    $_POST['学生学号'] = $GLOBAL_USER->学号;
    $_POST['是否受理'] = "否";
    $_POST['是否评价'] = "否";
    $_POST['维修状态'] = "否";
    $_POST['校区名称'] = "本校区";
    $_POST['维修及时率'] = null;
    $_POST['维修耗时'] = null;
    $_POST['挂单耗时'] = null;
    $_POST['挂单时间'] = null;
    $_POST['报修方式'] = "H5报修";
    
}

function plugin_data_wygl_baoxiuxinxi_7_add_default_data_after_submit($id)  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
    $sql        = "update `$TableName` set 报修方式='H5报修', 学生学号='".$GLOBAL_USER->学号."' where id = '$id'";
    $db->Execute($sql);
}

function plugin_data_wygl_baoxiuxinxi_7_edit_default($id)  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
}

function plugin_data_wygl_baoxiuxinxi_7_edit_default_data_before_submit($id)  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
    $_POST['报修人'] = $GLOBAL_USER->姓名;
}

function plugin_data_wygl_baoxiuxinxi_7_edit_default_data_after_submit($id)  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
}

function plugin_data_wygl_baoxiuxinxi_7_edit_default_configsetting_data($id)  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
    /*
    $sql        = "select * from `$TableName` where id = '$id'";
    $rs         = $db->Execute($sql);
    $rs_a       = $rs->GetArray();
    foreach($rs_a as $Line)  {
        //
    }
    */
}

function plugin_data_wygl_baoxiuxinxi_7_view_default($id)  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
}

function plugin_data_wygl_baoxiuxinxi_7_delete_array($id)  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
}

function plugin_data_wygl_baoxiuxinxi_7_updateone($id)  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
}

function plugin_data_wygl_baoxiuxinxi_7_import_default_data_before_submit($Element)  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
    return $Element;
}

function plugin_data_wygl_baoxiuxinxi_7_import_default_data_after_submit()  {
    global $db;
    global $SettingMap;
    global $MetaColumnNames;
    global $GLOBAL_USER;
    global $TableName;
    //Here is your write code
}


?>